package com.example.administrator.testc.LoadBitmap;/**
 * Created by Administrator on 2016/5/29 0029.
 */

import android.graphics.Bitmap;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.widget.ImageView;

import com.example.administrator.testc.R;

/**
 * >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>类描述
 * >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>属性描述
 * >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>方法描述
 */
public class TestMain extends AppCompatActivity {

    private ImageView imageView;
    private String imgUrl = "http://p.xincheping.com/201605/c9/c06f1501f3403f96a546d06566310f_180.jpg";

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.loadbitmap_layout);
        imageView = (ImageView) findViewById(R.id.imageView4);
        new MyHttp(imgUrl, new MyHttp.iHttpStream() {
            @Override
            public void onSuccess(Bitmap inputStream) {
                imageView.setImageBitmap(inputStream);
            }
        });
    }
}
